﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microsoft.WindowsAzure.StorageClient;
using Microsoft.WindowsAzure;

namespace Web.Controllers
{
    public class VideoGalleryController : Controller
    {
        //
        // GET: /VideoGallery/
       /*
        * private CloudStorageAccount storageAccount;
        private CloudBlobClient blobClient;
        private CloudBlobContainer container;
        private CloudBlob blob;

        public VideoGalleryController()
        {
            // retrive storage account information
            storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("healthcommunity"));

            // Create the blob client 
            blobClient = storageAccount.CreateCloudBlobClient();

            // Retrieve a reference to a container 
            container = blobClient.GetContainerReference("healthcontainervideo");

            // Create the container if it doesn't already exist
            container.CreateIfNotExist();

            // Make the container public so that we can hit the URLs from the web 
            container.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });

            // Retrieve reference to a blob named "blobVideo"
            blob = container.GetBlobReference("blobVideo");

            // Create or overwrite the "myblob" blob with contents from a local file
            using (var fileStream = System.IO.File.OpenRead(@"C:\Program Files\IIS Express\Video\test.avi"))
            {
                blob.UploadFromStream(fileStream);
            }
        }*/
        public ActionResult Index()
        {
           // new VideoGalleryController();
            return View();
        }
    }
    
}
